__author__ = 'Muscle'


import mui
from mui import muiApp
from mui.muiwindow import MUIWindow
import mui.CExt.muiDX as muiDX
from mui.muicomponent import MUIComponent
from mui.Widgets.muibutton import *

class MyWindow(MUIWindow):
    def __init__(self, **kwargs):
        MUIWindow.__init__(self, **kwargs)
        self.group = MUIGroup(self, left = 0, top = 0, width = self.width, height = self.height, bgColor = (0,0,0,0))
        self.background = 'dialog\\volume_bg.png |(10,10,10,10)'
        #self.muicomp3 = MUIComponent(self, left = 300, top = 300, width = 30, height = 30, bgColor = (1.0,0.5,0.5,1.0))
        self.muicomp = MUIRadioButton(self.group,  left = 20, top = 20, width = 300, height = 300, name = 'btn', text = 'radio btn 1', fontColor = color.white)
        #self.muicomp2 = MUIRadioButton(self.group, left = 20, top = 60, width = 200, height = 30, name = 'btn', text = 'radio btn 2', fontColor = color.white, image = 'pyglet.png')
        self.muicomp4 = MUIImage(self, left = 400, top = 300, width = 200, height = 160, image = 'testImg.jpg', stretch = 'UniformFill', bClip = False, bgColor = (0, 0, 0, 0))
        #self.muicomp5 = MUIText(self, left = 400, top = 100, width = 120, height = 60, text = 'MUI Text', fontColor = color.white)
def main():
    mui.muiInit(main)
    g_DXDevice = muiDX.CDXDevice()
    w = MyWindow(width = 1024, height = 768, dxDevice = g_DXDevice)
    w.ShowWindow(1)
    muiApp.run()
    g_DXDevice.Release()
    mui.muiUnInit()



main()



